package com.huonan.component.tmp;

import com.huonan.component.tmp.filter.DyUserTextFilter;
import com.huonan.component.tmp.filter.UserTextFilter;
import com.huonan.component.tmp.filter.WeiboUserTextFilter;
import com.huonan.component.tmp.filter.XhsUserTextFilter;

public class SourceFactory {
    public static UserTextFilter createSourceFilter(SourceEnum source) {
        if (source.equals(SourceEnum.WEIBO)) {
            return new WeiboUserTextFilter();
        } else if (source.equals(SourceEnum.XIAOHONGSHU)) {
            return new XhsUserTextFilter();
        }else if (source.equals(SourceEnum.DOUYIN)) {
            return new DyUserTextFilter();
        }else {
            throw  new RuntimeException("source not match");
        }
    }
}
